package com.fac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付记录表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("payment_records")
@ApiModel(description = "支付记录实体类")
public class PaymentRecord implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "支付ID", example = "1")
    private Long paymentId;

    @ApiModelProperty(value = "支付编号", example = "P202401010001", required = true)
    private String code;

    @ApiModelProperty(value = "订单ID", example = "1", required = true)
    private Long orderId;

    @ApiModelProperty(value = "订单类型：租赁单/维修单", example = "租赁单", required = true)
    private String orderType;

    @ApiModelProperty(value = "金额", example = "1000.00", required = true)
    private BigDecimal amount;

    @ApiModelProperty(value = "支付类型：租金/押金/维修费", example = "租金", required = true)
    private String paymentType;

    @ApiModelProperty(value = "支付方式：微信/支付宝/信用卡", example = "微信", required = true)
    private String paymentMethod;

    @ApiModelProperty(value = "状态：0未支付，1已支付", example = "1", required = true)
    private Integer status;

    @ApiModelProperty(value = "交易ID", example = "2024010112345678")
    private String transactionId;

    @ApiModelProperty(value = "支付时间", example = "2024-01-01 12:00:00")
    private LocalDateTime paymentTime;

    @ApiModelProperty(value = "创建时间", example = "2024-01-01 12:00:00")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间", example = "2024-01-01 12:00:00")
    private LocalDateTime updatedAt;
} 